import tui from '../../../../common/httpRequest'
Page({
  data: {
    mobile: '',
    password: '',
    popupShow: false
  },
  inputMobile: function (e) {
    this.setData({
      mobile: e.detail.value
    })
  },
  inputPwd: function (e) {
    this.setData({
      password: e.detail.value
    })
  },
  clearInput(e) {
    let type = e.currentTarget.dataset.type
    if (type == 1) {
      this.setData({
        mobile: ''
      })
    } else {
      this.setData({
        password: ''
      })
    }
  },
  href(e) {
    let type = e.currentTarget.dataset.type
    let url = '../forgetPwd/forgetPwd';
    if (type == 2) {
      url = '../reg/reg';
    }
    tui.href(url);
  },
  showOtherLogin() {
    //打开后 不再关闭
    this.setData({
      popupShow: true
    })
  },
  onShareAppMessage: function () {
    return {
      title: "ThorUI组件库-登录模板"
    }
  }
})